In Expressions
The in operator has been extended to support string searches and table searches. For these purposes, it's the fastest possible solution.
Searching for a substring.pluto
When used on tables, the in operator searches for values. It'll search for array elements and it'll search keys for their values.
Searching a table for a value.pluto
Rules
- The right-hand operand must always be a table or a string.
- The left-hand operand must be a string if the right-hand operand is a string.
- The left-hand operand can be anything if the right-hand operand is a table.
caution
The bytecode of this feature is not backwards-compatible with Lua.